<!DOCTYPE html>
<html>
<head>
	<#import "../common/common.macro.ftl" as netCommon>
	<@netCommon.commonStyle />
	<!-- DataTables -->
	<link rel="stylesheet" href="${request.contextPath}/static/adminlte/bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css">
	<title>${I18n.admin_name}</title>
</head>
<body class="hold-transition skin-blue sidebar-mini <#if cookieMap?exists && cookieMap["xxljob_adminlte_settings"]?exists && "off" == cookieMap["xxljob_adminlte_settings"].value >sidebar-collapse</#if>">
<div class="wrapper">
	<!-- header -->
	<@netCommon.commonHeader />
	<!-- left -->
	<@netCommon.commonLeft "tenant" />

	<!-- Content Wrapper. Contains page content -->
	<div class="content-wrapper">
		<!-- Content Header (Page header) -->
		<section class="content-header">
			<h1>${I18n.tenant_manage}</h1>
		</section>

		<!-- Main content -->
		<section class="content">

			<div class="row">
				<div class="col-xs-3">
					<div class="input-group">
						<span class="input-group-addon">${I18n.tenant_id}</span>
						<input type="text" class="form-control" id="tenantId" autocomplete="on" >
					</div>
				</div>
				<div class="col-xs-3">
					<div class="input-group">
						<span class="input-group-addon">${I18n.tenant_name}</span>
						<input type="text" class="form-control" id="tenantName" autocomplete="on" >
					</div>
				</div>
				<div class="col-xs-3">
					<div class="input-group">
						<span class="input-group-addon">${I18n.tenant_status}</span>
						<select class="form-control" id="validStatus" >
							<option value="" >${I18n.system_all}</option>
							<option value="Y" >${I18n.tenant_status_valid}</option>
							<option value="N" >${I18n.tenant_status_invalid}</option>
						</select>
					</div>
				</div>
				<div class="col-xs-1">
					<button class="btn btn-block btn-info" id="searchBtn">${I18n.system_search}</button>
				</div>
				<div class="col-xs-2">
					<button class="btn btn-block btn-success add" type="button">${I18n.tenant_add}</button>
				</div>
			</div>

			<div class="row">
				<div class="col-xs-12">
					<div class="box">
						<div class="box-body" >
							<table id="tenant_list" class="table table-bordered table-striped" width="100%" >
								<thead>
								<tr>
									<th name="id" >ID</th>
									<th name="tenantId" >${I18n.tenant_id}</th>
									<th name="tenantName" >${I18n.tenant_name}</th>
									<th name="validStatus" >${I18n.tenant_status}</th>
									<th name="accessToken" >${I18n.tenant_access_token}</th>
									<th>${I18n.system_opt}</th>
								</tr>
								</thead>
								<tbody></tbody>
								<tfoot></tfoot>
							</table>
						</div>
					</div>
				</div>
			</div>
		</section>
	</div>

	<!-- footer -->
	<@netCommon.commonFooter />
</div>

<!-- 新增.模态框 -->
<div class="modal fade" id="addModal" tabindex="-1" role="dialog"  aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<h4 class="modal-title" >${I18n.tenant_add}</h4>
			</div>
			<div class="modal-body">
				<form class="form-horizontal form" role="form" >
					<div class="form-group">
						<label for="lastname" class="col-sm-3 control-label">${I18n.tenant_id}<font color="red">*</font></label>
						<div class="col-sm-7"><input type="text" class="form-control" name="tenantId" placeholder="${I18n.system_please_input}${I18n.tenant_id}" maxlength="20" ></div>
					</div>
					<div class="form-group">
						<label for="lastname" class="col-sm-3 control-label">${I18n.tenant_name}<font color="red">*</font></label>
						<div class="col-sm-7"><input type="text" class="form-control" name="tenantName" placeholder="${I18n.system_please_input}${I18n.tenant_name}" maxlength="20" ></div>
					</div>
					<div class="form-group">
						<label for="lastname" class="col-sm-3 control-label">${I18n.tenant_admin_password}<font color="red">*</font></label>
						<div class="col-sm-7"><input type="text" class="form-control" name="adminPassword" placeholder="${I18n.system_please_input}${I18n.tenant_admin_password}" maxlength="20" ></div>
					</div>
					<div class="form-group">
						<label for="lastname" class="col-sm-3 control-label">${I18n.tenant_status}<font color="red">*</font></label>
						<div class="col-sm-9">
							<input type="radio" name="role" value="Y" checked />${I18n.tenant_status_valid}
							&nbsp;&nbsp;&nbsp;&nbsp;
							<input type="radio" name="role" value="N" />${I18n.tenant_status_invalid}
						</div>
					</div>
					<div class="form-group">
						<label for="lastname" class="col-sm-3 control-label">${I18n.tenant_access_token}<font color="red">*</font></label>
						<div class="col-sm-7"><input type="text" class="form-control" name="accessToken" placeholder="${I18n.system_please_input}${I18n.tenant_access_token}" maxlength="60" ></div>
					</div>
					<hr>
					<div class="form-group">
						<div class="col-sm-offset-3 col-sm-6">
							<button type="submit" class="btn btn-primary"  >${I18n.system_save}</button>
							<button type="button" class="btn btn-default" data-dismiss="modal">${I18n.system_cancel}</button>
						</div>
					</div>

				</form>
			</div>
		</div>
	</div>
</div>

<!-- 更新.模态框 -->
<div class="modal fade" id="updateModal" tabindex="-1" role="dialog"  aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<h4 class="modal-title" >${I18n.tenant_update}</h4>
			</div>
			<div class="modal-body">
				<form class="form-horizontal form" role="form" >
					<div class="form-group">
						<label for="lastname" class="col-sm-3 control-label">${I18n.tenant_id}<font color="red">*</font></label>
						<div class="col-sm-7"><input type="text" class="form-control" name="tenantId" placeholder="${I18n.system_please_input}${I18n.tenant_id}" maxlength="20" readonly ></div>
					</div>
					<div class="form-group">
						<label for="lastname" class="col-sm-3 control-label">${I18n.tenant_name}<font color="red">*</font></label>
						<div class="col-sm-7"><input type="text" class="form-control" name="tenantName" placeholder="${I18n.system_please_input}${I18n.tenant_name}" maxlength="20" ></div>
					</div>
					<div class="form-group">
						<label for="lastname" class="col-sm-3 control-label">${I18n.tenant_admin_password}<font color="red"></font></label>
						<div class="col-sm-7"><input type="text" class="form-control" name="adminPassword" placeholder="${I18n.user_password_update_placeholder}" maxlength="20" ></div>
					</div>
					<div class="form-group">
						<label for="lastname" class="col-sm-3 control-label">${I18n.tenant_status}<font color="red">*</font></label>
						<div class="col-sm-9">
							<input type="radio" name="validStatus" value="Y" />${I18n.tenant_status_valid}
							&nbsp;&nbsp;&nbsp;&nbsp;
							<input type="radio" name="validStatus" value="N" />${I18n.tenant_status_invalid}
						</div>
					</div>
					<div class="form-group">
						<label for="lastname" class="col-sm-3 control-label">${I18n.tenant_access_token}<font color="red">*</font></label>
						<div class="col-sm-7"><input type="text" class="form-control" name="accessToken" placeholder="${I18n.system_please_input}${I18n.tenant_access_token}" maxlength="20" ></div>
					</div>
					<hr>
					<div class="form-group">
						<div class="col-sm-offset-3 col-sm-6">
							<button type="submit" class="btn btn-primary"  >${I18n.system_save}</button>
							<button type="button" class="btn btn-default" data-dismiss="modal">${I18n.system_cancel}</button>
							<input type="hidden" name="id" >
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>
</div>

<@netCommon.commonScript />
<!-- DataTables -->
<script src="${request.contextPath}/static/adminlte/bower_components/datatables.net/js/jquery.dataTables.min.js"></script>
<script src="${request.contextPath}/static/adminlte/bower_components/datatables.net-bs/js/dataTables.bootstrap.min.js"></script>
<script src="${request.contextPath}/static/js/tenant.index.1.js"></script>
</body>
</html>
